package ie.dcu.spca.data;

import ie.dcu.spca.model.bean.User;

import java.util.List;

public interface UserDataManager extends BasicDataManager {

    /**
     * Create new User by name, save it to the Database
     * 
     * @param name
     *            User name
     * @return The saved User with filling fields
     */
    int create(String name);

    /**
     * Update an user by id to a new name
     * 
     * @param id
     * @param name
     */
    void update(int id, String name);

    /**
     * Update user in database
     * 
     * @param user
     */
    void update(User user);

    /**
     * @return All Users In the Database
     */
    List<User> get();
}
